#define  _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main()
{
	char arr[100];
	
	while (scanf("%s", &arr) != EOF)
	{
		int len = strlen(arr);
		int i = 0;
		for (i = len-1; i >=0; i--)
		{
			printf("%c ", arr[i]);
		}
		printf("\n");
	}
	return 0;
}